<template>
  <div id="FormDialog">
    <PeopleSelect
      ref="peopleSelect"
      :type="'multiple'"
      :isCheck="true"
      :open="peopleOpen"
      @cancel="peopleOpen = false"
      @submit="submitPeople"
    ></PeopleSelect>
    <DepartmentDialog
      ref="peopleSelect"
      :type="'multiple'"
      :isCheck="true"
      :open="peopleOpen1"
      @cancel="peopleOpen1 = false"
      @submit="submitPeople1"
    ></DepartmentDialog>
    <el-row>
      <el-col :span="24" class="margin_col">
        <div class="always_handerOne">
          <div class="always_hander"></div>
          <div class="always_title">
            {{ title ? `${title}` : "问题整改" }}
          </div>
        </div>
      </el-col>
      <el-col :span="24" class="margin_col">
        <div class="always_handerOne1">
          <el-collapse v-model="activeNames">
            <el-collapse-item name="1">
              <template slot="title">
                <div class="always_title1">
                  <div></div>
                  整改情况
                </div>
              </template>
              <el-form
                :model="formData"
                ref="vForm"
                :rules="rules"
                label-position="center"
                label-width="120px"
                :size="medium"
                style="display: flex; justify-content: flex-start"
              >
                <el-col :span="24" class="el_col">
                  <el-form-item
                    label="整改情况"
                    prop="requireSituation"
                    style="width: 100%"
                  >
                    <el-input
                      type="textarea"
                      :rows="4"
                      placeholder="请输入内容"
                      v-model="formData.requireSituation"
                      :disabled="isRequireSituation"
                    >
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-form-item
                  label="责任部门"
                  prop="deptName"
                  style="width: 33.3%"
                >
                  <el-input
                    v-model="formData.deptName"
                    :disabled="isDeptName"
                    type="text"
                    @click.native="open2"
                    clearable
                    :size="medium"
                    placeholder="请选择责任部门"
                  ></el-input>
                </el-form-item>
                <el-form-item
                  label="责任人"
                  prop="responsibleName"
                  style="width: 33.3%"
                >
                  <el-input
                    v-model="formData.responsibleName"
                    :disabled="isResponsibleName"
                    type="text"
                    @click.native="open"
                    clearable
                    :size="medium"
                    placeholder="请选择责任人"
                  ></el-input>
                </el-form-item>
                <el-form-item
                  label="整改日期"
                  prop="okTime"
                  style="width: 33.3%"
                >
                  <el-date-picker
                    clearable
                    v-model="formData.okTime"
                    :disabled="isOkTime"
                    type="date"
                    value-format="yyyy-MM-dd"
                    placeholder="请选择整改日期"
                  >
                  </el-date-picker>
                </el-form-item>
                <el-form-item
                  label="整改后照片"
                  prop="okPhoto"
                  style="width: 100%"
                >
                  <!-- <el-upload
                    v-model="formData.okPhoto"
                    class="upload-demo"
                    :action="uploadFileUrl"
                    :on-preview="handlePreview"
                    :on-remove="handleRemove"
                    :on-success="cesjo"
                    multiple
                    :limit="3"
                    :on-exceed="handleExceed"
                  >
                    <i slot="default" class="el-icon-plus"></i>
                  </el-upload> -->
                  <el-upload
                    v-model="formData.okPhoto"
                    :action="uploadFileUrl"
                    list-type="picture-card"
                    :file-list="fileListabra"
                    :on-remove="handleRemove"
                    :on-success="cesjo"
                    :on-exceed="handleExceed"
                    :on-preview="handlePictureCardPreview2"
                    :before-upload="handleBeforeUploadTwo"
                    :headers="headers"
                    :disabled="isokPhoto"
                  >
                    <i slot="default" class="el-icon-plus"></i>
                    <div slot="file" slot-scope="{ file }">
                      <img
                        class="el-upload-list__item-thumbnail"
                        :src="file.urlT"
                        alt=""
                      />
                      <span class="el-upload-list__item-actions">
                        <span
                          class="el-upload-list__item-preview"
                          @click="handlePictureCardPreview2(file)"
                        >
                          <i class="el-icon-zoom-in"></i>
                        </span>
                        <span
                          v-if="!disabled2"
                          class="el-upload-list__item-delete"
                          @click="handleDownload(file)"
                        >
                          <i class="el-icon-download"></i>
                        </span>
                        <span
                          v-if="!isokPhotoRemove"
                          class="el-upload-list__item-delete"
                          @click="handleRemove(file)"
                        >
                          <i class="el-icon-delete"></i>
                        </span>
                      </span>
                    </div>
                  </el-upload>
                  <div v-if="!fileShow" class="block_file_name">
                    <el-tooltip
                      v-for="(file, index) in newfileListaber"
                      :key="index"
                      style="display: inline-block"
                      class="item"
                      effect="dark"
                      :content="file.oldFileName"
                      placement="top-start"
                    >
                      <el-button
                        style="
                          overflow: hidden;
                          text-overflow: ellipsis;
                          white-space: nowrap;
                          width: 100px;
                        "
                        >{{ file.oldFileName }}</el-button
                      >
                    </el-tooltip>
                  </div>

                  <el-dialog :visible.sync="dialogVisible2">
                    <img width="100%" :src="dialogImageUrl2" alt="" />
                  </el-dialog>
                </el-form-item>
              </el-form>
            </el-collapse-item>
          </el-collapse>

          <el-collapse v-model="activeNames">
            <el-collapse-item name="1">
              <template slot="title">
                <div class="always_title1">
                  <div></div>
                  基本信息
                </div>
              </template>
              <el-form
                :model="formData"
                ref="vForm"
                :rules="rules"
                label-position="center"
                label-width="120px"
                :size="medium"
                style="display: flex; justify-content: flex-start"
              >
                <el-form-item
                  label="评审事件"
                  prop="reviewEvents"
                  class="required"
                  style="width: 33.3%"
                >
                  <el-input
                    v-model="formData.reviewEvents"
                    :disabled="true"
                    type="text"
                    clearable
                    :size="medium"
                    placeholder="请输入内容"
                  ></el-input>
                </el-form-item>
                <el-form-item
                  label="评审人"
                  prop="examiner"
                  class="required"
                  style="width: 33.3%"
                >
                  <el-input
                    v-model="formData.examiner"
                    :disabled="true"
                    type="text"
                    clearable
                    :size="medium"
                    placeholder="请输入评审人"
                  ></el-input>
                </el-form-item>
                <el-form-item
                  label="要素"
                  prop="evaluationElements"
                  style="width: 33.3%"
                >
                  <el-input
                    v-model="formData.evaluationElements"
                    :disabled="true"
                    type="text"
                    clearable
                    :size="medium"
                    placeholder="请输入内容"
                  ></el-input>
                </el-form-item>
                <el-form-item
                  label="标准分"
                  prop="standardScore"
                  style="width: 33.3%"
                >
                  <el-input
                    v-model="formData.standardScore"
                    :disabled="true"
                    type="text"
                    clearable
                    :size="medium"
                    placeholder="请输入内容"
                  ></el-input>
                </el-form-item>
                <el-form-item
                  label="状态"
                  prop="reviewStatus"
                  style="width: 33.3%"
                >
                  <el-input
                    v-model="formData.reviewStatus"
                    type="text"
                    clearable
                    :size="medium"
                    :disabled="true"
                    placeholder="请输入内容"
                  ></el-input>
                </el-form-item>
                <el-form-item
                  label="查评对象"
                  prop="evaluateObject"
                  style="width: 33.3%"
                >
                  <el-input
                    :disabled="true"
                    v-model="formData.evaluateObject"
                    type="text"
                    clearable
                    :size="medium"
                    placeholder="请输入内容"
                  ></el-input>
                </el-form-item>
                <el-container style="width: 90%">
                  <el-container>
                    <el-header class="el-header">
                      <el-form-item
                        style="width: 100%"
                        label="是否适用"
                        prop="isApply"
                      >
                        <el-checkbox-group
                          size="medium"
                          v-model="formData.isApply"
                          @change="setMealSelect"
                        >
                          <el-checkbox-button
                            class="ces"
                            v-for="(item, index) in suit"
                            :label="item.name"
                            :key="index"
                            :disabled="true"
                            >{{ item.name }}</el-checkbox-button
                          >
                          <!-- :disabled="true" -->
                        </el-checkbox-group>
                      </el-form-item>
                    </el-header>
                    <!-- <el-main class="el-header"> -->
                    <el-form-item
                      style="width: 100%"
                      label="是否存在问题"
                      prop="isProblem"
                      v-if="flagNew"
                    >
                      <el-checkbox-group
                        v-model="formData.isProblem"
                        @change="isProblemChange(formData.isProblem)"
                      >
                        <el-checkbox-button
                          class="ces"
                          v-for="(item, index) in isproblem"
                          :label="item.name"
                          :key="index"
                          :disabled="true"
                          >{{ item.name }}</el-checkbox-button
                        >
                      </el-checkbox-group>
                    </el-form-item>
                    <!-- </el-main> -->

                    <!-- <el-main class="el-header"> -->
                    <el-form-item
                      style="width: 100%"
                      label="是否重大问题"
                      v-if="gist"
                      prop="isGreatProblem"
                    >
                      <el-checkbox-group
                        v-model="formData.isGreatProblem"
                        @change="isProblemBigChange"
                      >
                        <el-checkbox-button
                          class="ces"
                          v-for="(item, index) in isproblembig"
                          :label="item.name"
                          :key="index"
                          :disabled="true"
                          >{{ item.name }}</el-checkbox-button
                        >
                      </el-checkbox-group>
                    </el-form-item>
                    <!-- </el-main> -->
                    <!-- <el-mian class="el-header"> -->
                    <el-form-item
                      label="扣分"
                      prop="deduct"
                      style="width: 100%"
                    >
                      <el-input-number
                        v-model="formData.deduct"
                        @change="cliekDen(formData.deduct)"
                        :min="0"
                        :max="100"
                        :disabled="true"
                        label="描述文字"
                      ></el-input-number>
                    </el-form-item>
                    <!-- </el-mian> -->
                  </el-container>
                  <el-aside width="66.6%" class="style-Change">
                    <el-form-item
                      label="支撑材料"
                      prop="backingMaterial"
                      class="required"
                    >
                      <div>
                        <el-upload
                          multiple
                          v-model="formData.backingMaterial"
                          :action="uploadFileUrl"
                          :before-upload="handleBeforeUpload"
                          :file-list="fileList"
                          :on-error="handleUploadError"
                          :on-preview="handlePictureCardPreview"
                          :on-exceed="handleExceed"
                          :on-success="handleUploadSuccess"
                          :show-file-list="true"
                          :headers="headers"
                          class="upload-file-uploader"
                          list-type="picture-card"
                          :auto-upload="true"
                          :disabled="true"
                        >
                          <!-- :hidden="isBackingMaterial" -->
                          <i slot="default" class="el-icon-plus"></i>
                          <!-- v-if="fileHidden" -->
                          <div
                            slot="file"
                            slot-scope="{ file }"
                            style="width: 400%"
                          >
                            <img
                              class="el-upload-list__item-thumbnail"
                              :src="file.urlT"
                              alt=""
                            />

                            <span class="el-upload-list__item-actions">
                              <span
                                class="el-upload-list__item-preview"
                                v-if="true"
                                @click="handlePictureCardPreview(file)"
                              >
                                <i class="el-icon-zoom-in"></i>
                              </span>
                              <span
                                v-if="true"
                                class="el-upload-list__item-delete"
                                @click="handleDownload(file)"
                              >
                                <i class="el-icon-download"></i>
                              </span>
                              <span
                                v-if="false"
                                class="el-upload-list__item-delete"
                                @click="removeFile(index, file)"
                              >
                                <i class="el-icon-delete"></i>
                              </span>
                            </span>
                          </div>
                        </el-upload>
                        <div v-if="!fileShow" class="block_file_name">
                          <el-tooltip
                            v-for="(file, index) in newfileList"
                            :key="index"
                            style="display: inline-block"
                            class="item"
                            effect="dark"
                            :content="file.oldFileName"
                            placement="top-start"
                          >
                            <el-button
                              style="
                                overflow: hidden;
                                text-overflow: ellipsis;
                                white-space: nowrap;
                                width: 100px;
                              "
                              >{{ file.oldFileName }}</el-button
                            >
                          </el-tooltip>
                          <!-- <span
                            v-for="(file, index) in newfileList"
                            :key="index"
                            style="display: inline-block"
                          >
                            {{ file.oldFileName }}
                          </span> -->
                        </div>
                        <!-- <el-upload
                          multiple
                          v-model="formData.backingMaterial"
                          :action="uploadFileUrl"
                          :before-upload="handleBeforeUpload"
                          :file-list="fileList"
                          :limit="6"
                          :on-error="handleUploadError"
                          :on-exceed="handleExceed"
                          :on-success="handleUploadSuccess"
                          :show-file-list="false"
                          :headers="headers"
                          class="upload-file-uploader"
                          ref="fileUpload"
                        >
                          上传按钮
                          <i slot="default" class="el-icon-plus"></i>
                          <el-button size="mini" type="primary" v-if="false"
                            >选取文件</el-button
                          >
                        </el-upload>
                        显示上传的文件
                        <div v-for="(file, index) in fileList" :key="index">
                          <span
                            >{{
                              file.name
                            }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span
                          >
                          <el-button
                            size="mini"
                            type="danger"
                            @click="removeFile(index, file)"
                            >移除</el-button
                          >
                        </div> -->
                      </div>
                      <!-- <div v-for="(file, index) in newfileList" :key="index">
                        <a
                          >{{
                            file.oldFileName
                          }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a
                        >
                      </div> -->
                    </el-form-item>
                  </el-aside>
                </el-container>
                <!-- <el-form-item
                  label="是否适用"
                  prop="isApply"
                  style="width: 33.3%"
                >
                  <el-radio-group v-model="formData.isApply" :disabled="true">
                    <el-radio label="0">适用</el-radio>
                    <el-radio label="1">部分适用</el-radio>
                    <el-radio label="2">不适用</el-radio>
                  </el-radio-group>
                </el-form-item> -->
                <!-- <el-form-item
                  label="是否存在问题"
                  prop="isProblem"
                  style="width: 33.3%"
                >
                  <el-radio-group v-model="formData.isProblem" :disabled="true">
                    <el-radio label="1" value="1">是</el-radio>
                    <el-radio label="0" value="0">否</el-radio>
                  </el-radio-group>
                </el-form-item> -->

                <!-- <el-form-item
                  label="是否重大问题"
                  prop="isGreatProblem"
                  style="width: 33.3%"
                >
                  <el-radio-group
                    v-model="formData.isGreatProblem"
                    :disabled="true"
                  >
                    <el-radio label="1">是</el-radio>
                    <el-radio label="0">否</el-radio>
                  </el-radio-group>
                </el-form-item> -->

                <!-- <el-col :span="24" class="el_col"> -->
                <!-- <el-form-item label="扣分" prop="deduct">
                    <el-input-number
                      v-model="formData.deduct"
                      @change="cliekDen(formData.deduct)"
                      :min="0"
                      :max="formData.standardScore"
                      :disabled="true"
                      label="描述文字"
                    ></el-input-number>
                  </el-form-item> -->
                <!-- <el-form-item label="扣分" prop="deduct" style="width: 100%">
                    <el-radio-group v-model="formData.deduct" :disabled="true">
                      <el-radio label="0">0</el-radio>
                      <el-radio label="1">1</el-radio>
                      <el-radio label="2">2</el-radio>
                      <el-radio label="3">3</el-radio>
                      <el-radio label="4">4</el-radio>
                      <el-radio label="5">5</el-radio>
                      <el-radio label="6">6</el-radio>
                      <el-radio label="7">7</el-radio>
                      <el-radio label="8">8</el-radio>
                      <el-radio label="9">9</el-radio>
                      <el-radio label="10">10</el-radio>
                      <el-radio label="11">11</el-radio>
                      <el-radio label="12">12</el-radio>
                      <el-radio label="13">13</el-radio>
                      <el-radio label="14">14</el-radio>
                      <el-radio label="15">15</el-radio>
                    </el-radio-group>
                  </el-form-item> -->
                <!-- </el-col> -->
                <el-form-item label="现场照片" prop="scenePhoto">
                  <div class="imageList">
                    <!--                        <div class="block" v-for="fit in imgurl" :key="fit">-->
                    <!--                          <el-image-->
                    <!--                            style="width: 100px; height: 100px; margin-left: 15px;"-->
                    <!--                            :src="fit"-->
                    <!--                            :fit="fit">-->
                    <!--                          </el-image>-->
                    <!--                        </div>-->
                  </div>
                </el-form-item>
                <el-col :span="24" class="el_col">
                  <el-form-item
                    label="查证情况"
                    prop="lookPapersCase"
                    style="width: 100%"
                  >
                    <el-input
                      :disabled="true"
                      type="textarea"
                      :rows="4"
                      placeholder="请输入内容"
                      v-model="formData.lookPapersCase"
                    >
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24" class="el_col">
                  <el-form-item
                    label="扣分依据"
                    prop="deductPursuant"
                    style="width: 100%"
                  >
                    <el-input
                      :disabled="true"
                      type="textarea"
                      :rows="4"
                      placeholder="请输入内容"
                      v-model="formData.deductPursuant"
                    >
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24" class="el_col">
                  <el-form-item
                    label="存在问题"
                    prop="problem"
                    style="width: 100%"
                    v-if="gist"
                  >
                    <el-input
                      :disabled="true"
                      type="textarea"
                      :rows="4"
                      placeholder="请输入内容"
                      v-model="formData.problem"
                    >
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24" class="el_col">
                  <el-form-item
                    label="整改建议"
                    prop="rectifySuggest"
                    style="width: 100%"
                    v-if="gist"
                  >
                    <el-input
                      :disabled="true"
                      type="textarea"
                      :rows="4"
                      placeholder="请输入内容"
                      v-model="formData.rectifySuggest"
                    >
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24" class="el_col">
                  <el-form-item
                    label="评审标准"
                    prop="scoreStandard"
                    style="width: 100%"
                  >
                    <el-input
                      type="textarea"
                      :disabled="true"
                      :rows="4"
                      placeholder="请输入内容"
                      v-model="formData.scoreStandard"
                    >
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24" class="el_col">
                  <el-form-item
                    label="评分标准"
                    prop="handleQuery"
                    style="width: 100%"
                  >
                    <el-input
                      type="textarea"
                      :disabled="true"
                      :rows="4"
                      placeholder="请输入内容"
                      v-model="formData.handleQuery"
                    >
                    </el-input>
                  </el-form-item>
                </el-col>
                <!-- <el-col :span="24" class="el_col">
                  <el-form-item
                    label="整改情况"
                    prop="requireSituation"
                    style="width: 100%"
                  >
                    <el-input
                      type="textarea"
                      :rows="4"
                      placeholder="请输入内容"
                      v-model="formData.requireSituation"
                      :disabled="isRequireSituation"
                    >
                    </el-input>
                  </el-form-item>
                </el-col>
                <el-form-item label="责任部门" prop="deptName" style="width: 33.3%;">
                  <el-input
                    v-model="formData.deptName"
                    :disabled="isDeptName"
                    type="text"
                    @click.native="open2"
                    clearable
                    :size="medium"
                    placeholder="请选择责任部门"
                  ></el-input>
                </el-form-item>
                <el-form-item label="责任人" prop="responsibleName" style="width: 33.3%;">
                  <el-input
                    v-model="formData.responsibleName"
                    :disabled="isResponsibleName"
                    type="text"
                    @click.native="open"
                    clearable
                    :size="medium"
                    placeholder="请选择责任人"
                  ></el-input>
                </el-form-item>
                <el-form-item label="整改日期" prop="okTime" style="width: 33.3%;">
                  <el-date-picker clearable
                                  v-model="formData.okTime"
                                  :disabled="isOkTime"
                                  type="date"
                                  value-format="yyyy-MM-dd"
                                  placeholder="请选择整改日期">
                  </el-date-picker>
                </el-form-item>
                <el-form-item label="整改后照片" prop="okPhoto" style="width: 33.3%;"> -->
                <!--                      <el-upload-->
                <!--                        v-model="formData.okPhoto"-->
                <!--                        class="upload-demo"-->
                <!--                        action="http://localhost:8080/"-->
                <!--                        :on-preview="handlePreview"-->
                <!--                        :on-remove="handleRemove"-->
                <!--                        :before-remove="beforeRemove"-->
                <!--                        multiple-->
                <!--                        :limit="3"-->
                <!--                        :on-exceed="handleExceed"-->
                <!--                      >-->
                <!--                        <el-button size="small" type="primary"-->
                <!--                        >点击上传</el-button-->
                <!--                        >-->
                <!--                      </el-upload>-->
                <!-- </el-form-item> -->
              </el-form>
            </el-collapse-item>
          </el-collapse>
        </div>
      </el-col>
      <el-col :span="24" class="margin_col" name="1">
        <div class="always_handerOne1">
          <custom-buttons
            @back="handleBack"
            @confirm="handleConfirm"
            :handleShow="handleShow"
          ></custom-buttons>
        </div>
      </el-col>
    </el-row>
  </div>
</template>
<script>
const suitOptions = [
  {
    name: "适用",
    id: 0,
    color: "#ecf5ff",
    border: "#b3d8ff",
  },
  {
    name: "不适用",
    id: 2,
    color: "#fdf6ec",
    border: "#f5dab1",
  },
  {
    name: "不参与",
    id: 1,
    color: "#fdf6ec",
    border: "#f5dab1",
  },
];
const problemOptions = [
  { name: "是", id: 1, color: "#fdf6ec", border: "#f5dab1" },
  { name: "否", id: 0, color: "#ecf5ff", border: "#b3d8ff" },
];
const isproblembig1 = [
  { name: "是", id: 1, color: "#fdf6ec", border: "#f5dab1" },
  { name: "否", id: 0, color: "#ecf5ff", border: "#b3d8ff" },
];
import { addGroping, updateGroping } from "@/api/system/review/groping";
import CustomButtons from "@/components/CustomButton/CustomButton.vue";
import PeopleSelect from "../../../components/Selection/index.vue";
import DepartmentDialog from "../../../components/DepartmentDialog/index.vue";
import { getToken } from "@/utils/auth";
import { delOss } from "@/api/system/oss";
import {
  getFilePath,
  delFileInfo,
  download,
  preview,
  viewPicture,
} from "@/api/system/sysFileInfo/fileInfo";
export default {
  components: {
    CustomButtons,
    PeopleSelect,
    DepartmentDialog,
  },
  props: {},
  data() {
    return {
      dialogImageUrl2: "",
      dialogVisible2: false,
      disabled2: false,
      number: 0,
      dialogVisible: false,
      uploadFileUrl: process.env.VUE_APP_BASE_API + "/system/fileInfo/upload", // 上传文件服务器地址
      headers: {
        Authorization: "Bearer " + getToken(),
      },
      numberTwo: 0,
      uploadListTwo: [],
      fileListabra: [],
      newfileListaber: [],
      uploadList: [],
      fileShow: true,
      flagNew: false, //是否适用
      suit: suitOptions,
      isproblem: problemOptions,
      isproblembig: isproblembig1,
      dialogImageUrl: "",
      isIsProblem: false,
      newfileList: [],
      fileList: [], //输入框的大小
      medium: "medium",
      activeNames: ["1", "2", "3"],
      tableData: [],
      selectedRows: [],
      gist: false,
      handleShow: true,
      formData: {
        id: undefined,
        reviewEvents: undefined,
        groupName: undefined,
        groupLeader: undefined,
        groupLeaderCode: undefined,
        member: undefined,
        memberCode: undefined,
        creationDate: undefined,
        createBy: undefined,
        createTime: undefined,
        updateBy: undefined,
        updateTime: undefined,
        isDelete: undefined,
        taskAllocation: undefined,
        evaluationElements: undefined,
        standardScore: undefined,
        reviewStatus: undefined,
        reviewEventsId: undefined,
        evaluationElementsId: undefined,
        refId: undefined,
        picture: undefined,
        examinerCode: undefined,
        examiner: undefined,
        isApply: ["适用"],
        lookWorkCase: undefined,
        evaluateCase: undefined,
        isInnovate: undefined,
        evaluateObject: undefined,
        backingMaterial: "",
        lookPapersCase: undefined,
        deduct: undefined,
        isProblem: ["是"],
        problem: undefined,
        isGreatProblem: ["否"],
        rectifySuggest: undefined,
        scenePhoto: undefined,
        reviewStandard: undefined,
        scoreStandard: undefined,
        deptCode: undefined,
        deptName: undefined,
        responsibleCode: undefined,
        responsibleName: undefined,
        requireOkTime: undefined,
        okTime: undefined,
        requireSituation: undefined,
        okPhoto: "",
        deductPursuant: undefined,
      },
      isRequireSituation: false,
      isDeptName: false,
      isResponsibleName: false,
      isokPhoto: false,
      isOkTime: false,
      isokPhotoRemove: false,
      title: "",
      rules: {
        ID: [{ required: true, message: "主键id不能为空", trigger: "blur" }],
        refId: [{ required: true, message: "外键不能为空", trigger: "blur" }],
        REMARK: [{ required: true, message: "备注不能为空", trigger: "blur" }],
        FILE: [
          { required: true, message: "附件信息不能为空", trigger: "blur" },
        ],
      },
      peopleOpen: false,
      peopleOpen1: false,
      FILEFileList: [],
      FILEUploadHeaders: {},
      FILEUploadData: {},
      listQueryParams: {},
    };
  },
  computed: {},
  watch: {
    newfileList: {
      handler(newVal, oldVal) {
        if (newVal.length > 0) {
          this.fileShow = false;
        } else {
          this.fileShow = true;
        }
      },
    },
  },
  created() {
    this.getTitle();
    this.handleRrdio();
    this.listQueryParams = this.$route.query.queryParams;
    this.gist = true;
    this.flagNew = false;
    // this.formData.isGreatProblem[0] = "否";

    if (this.$route.query.row.isApply == "2") {
      this.gist = false;
    }
    if (
      this.formData.isApply == undefined ||
      this.$route.query.row.isApply == "0"
    ) {
      this.formData.isApply = ["适用"];
    } else if (this.$route.query.row.isApply == "1") {
      this.formData.isApply = ["不参与"];
      // this.flagNew = false;
    } else if (this.$route.query.row.isApply == "2") {
      this.formData.isApply = ["不适用"];
      this.gist = false;
    }
    if (
      this.formData.isProblem == undefined ||
      this.$route.query.row.isProblem == "0"
    ) {
      this.formData.isProblem = ["否"];
      // this.gist = false
    } else {
      this.formData.isProblem = ["是"];
      // this.gist = true
    }
    if (
      this.formData.isGreatProblem == undefined ||
      this.$route.query.row.isGreatProblem == "0"
    ) {
      this.formData.isGreatProblem = ["否"];
    } else {
      this.formData.isGreatProblem = ["是"];
    }
    this.formData.backingMaterial = "";
    // this.formData.okPhoto = "";
  },
  mounted() {},
  methods: {
    testwo(res) {
      // debugger
      this.uploadListTwo.push({
        name: res.data.oldFileName,
        url: res.data.fileUrl,
        fileId: res.data.id,
        urlT: this.dialogImageUrl2,
      });
      this.uploadedSuccessfully2();
    },
    //文件上传
    handleBeforeUploadTwo(file) {
      false;
      this.$modal.loading("正在上传文件，请稍候...");
      this.numberTwo++;
      return true;
    },
    cesjo(res, file) {
      let suffix = res.data.fileName.split(".").pop();
      // debugger
      switch (suffix) {
        case "pdf":
          this.dialogImageUrl2 = require("@/" + "img/pdf.png");
          this.testwo(res);
          break;
        case "txt":
          this.dialogImageUrl2 = require("@/" + "img/txt.png");
          this.testwo(res);
          break;
        case "doc" || "docx":
          this.dialogImageUrl2 = require("@/" + "img/word.png");
          this.testwo(res);
          break;
        case "xlsx" || "xls":
          this.dialogImageUrl2 = require("@/" + "img/excel.png");
          this.testwo(res);
          break;
        case "MP4" || "MKV" || "RMVB":
          this.dialogImageUrl2 = require("@/" + "img/video.png");
          this.testwo(res);
          break;
        case "jpg":
          viewPicture(res.data.id).then((data) => {
            this.dialogImageUrl2 = window.URL.createObjectURL(
              new Blob([data], { type: "image/jpeg" })
            );
            this.testwo(res);
          });
          break;
        case "JPEG":
          viewPicture(res.data.id).then((data) => {
            this.dialogImageUrl2 = window.URL.createObjectURL(
              new Blob([data], { type: "image/jpeg" })
            );
            this.testwo(res);
          });
          break;
        case "png":
          viewPicture(res.data.id).then((data) => {
            this.dialogImageUrl2 = window.URL.createObjectURL(
              new Blob([data], { type: "image/jpeg" })
            );
            this.testwo(res);
          });
          break;
        default:
          this.dialogImageUrl2 = require("@/" + "img/1.png");
          this.testwo(res);
      }
      if (res.code === 200) {
        this.newfileListaber.push({
          oldFileName: res.data.oldFileName,
          url: res.data.fileUrl,
          id: res.data.id,
          urlT: this.dialogImageUrl2,
        });
        
        // this.formData.okPhoto = ''
        this.formData.okPhoto += res.data.id + ",";
        // console.log('this.formData.okPhoto1111',this.formData.okPhoto)
      } else {
        this.numberTwo--;
        this.$modal.closeLoading();
        this.$modal.msgError(res.msg);
        this.$refs.fileUpload.handleRemove(file);
        this.uploadedSuccessfully2();
      }
    },
    handlePictureCardPreview2(file) {
      this.dialogImageUrl2 = "";
      preview(file.fileId).then((data) => {
        if (data != "") {
          this.dialogImageUrl2 = window.URL.createObjectURL(
            new Blob([data], { type: "image/jpeg" })
          );
          return;
        }
      });
      this.dialogVisible2 = true;
    },
    // 上传结束处理
    uploadedSuccessfully2() {
      if (this.numberTwo > 0 && this.uploadListTwo.length === this.numberTwo) {
        this.fileListabra = this.fileListabra.concat(this.uploadListTwo);
        this.uploadListTwo = [];
        this.numberTwo = 0;
        this.$emit("input", this.listToString(this.fileListabra));
        this.$modal.closeLoading();
      }
    },
    async getFile(id) {
      //调用后台接口,根据当前id查询所有的文件路径
      let ids = {
          ids:id
        }
      getFilePath(ids)
        .then(async (response) => {
          this.newfileList = response.data;
          for (const row of this.newfileList) {
            switch (row.ext) {
              case "pdf":
                this.dialogImageUrl = require("@/" + "img/pdf.png");
                break;
              case "txt":
                this.dialogImageUrl = require("@/" + "img/txt.png");
                break;
              case "doc" || "docx":
                this.dialogImageUrl = require("@/" + "img/word.png");
                break;
              case "MP4" || "MKV" || "RMVB":
                this.dialogImageUrl = require("@/" + "img/video.png");
                break;
              case "jpg":
                try {
                  const data = await viewPicture(row.id);
                  this.dialogImageUrl = window.URL.createObjectURL(
                    new Blob([data], { type: "image/jpeg" })
                  );
                } catch (error) {
                  console.log(error);
                }
                break;
              case "png" || "JPEG":
                try {
                  const data = await viewPicture(row.id);
                  this.dialogImageUrl = window.URL.createObjectURL(
                    new Blob([data], { type: "image/jpeg" })
                  );
                } catch (error) {
                  console.log(error);
                }
                break;
              default:
                this.dialogImageUrl = require("@/" + "img/1.png");
            }
            this.fileList.push({
              fileId: row.id,
              urlT: this.dialogImageUrl,
              url: row.fileUrl,
              name: row.oldFileName,
            });
          }
        })
        .finally(() => {});
    },
    async getFileChange(id) {
      // let idNew = id.substring(0, 19)
      //调用后台接口,根据当前id查询所有的文件路径
      // for (const row of id){
      console.log('ididid',id)

        let ids = {
          ids:id
        }
      getFilePath(ids)
        .then(async (response) => {
          this.newfileListaber = response.data;
          for (const row of this.newfileListaber) {
            switch (row.ext) {
              case "pdf":
                this.dialogImageUrl2 = require("@/" + "img/pdf.png");
                break;
              case "txt":
                this.dialogImageUrl2 = require("@/" + "img/txt.png");
                break;
              case "doc" || "docx":
                this.dialogImageUrl2 = require("@/" + "img/word.png");
                break;
              case "MP4" || "MKV" || "RMVB":
                this.dialogImageUrl2 = require("@/" + "img/video.png");
                break;
              case "jpg":
                try {
                  const data = await viewPicture(row.id);
                  this.dialogImageUrl2 = window.URL.createObjectURL(
                    new Blob([data], { type: "image/jpeg" })
                  );
                } catch (error) {
                  console.log(error);
                }
                break;
              case "png" || "JPEG":
                try {
                  const data = await viewPicture(row.id);
                  this.dialogImageUrl2 = window.URL.createObjectURL(
                    new Blob([data], { type: "image/jpeg" })
                  );
                } catch (error) {
                  console.log(error);
                }
                break;
              default:
                this.dialogImageUrl2 = require("@/" + "img/1.png");
            }
            this.fileListabra.push({
              fileId: row.id,
              urlT: this.dialogImageUrl2,
              url: row.fileUrl,
              name: row.oldFileName,
            });
          }
        })
        .finally(() => {});
      // }
      // getFilePath(id)
      //   .then(async (response) => {
      //     console.log("response", response);
      // this.newfileListaber = response.data;
      // this.newfileListaber = response.data;
      // let listokPhoto = this.$route.query.row.okPhoto.split(",");
      // console.log(listokPhoto.pop())

      // for (const row of listokPhoto) {
      //   const data = await viewPicture(row);
      //   this.dialogImageUrl2 = window.URL.createObjectURL(
      //     new Blob([data], { type: "image/jpeg" })
      //   );
      //   this.fileListabra.push({
      //     // fileId: row.id,
      //     urlT: this.dialogImageUrl2,
      //     // url: row.fileUrl,
      //     // name: row.oldFileName,
      //   });
      // }
      // for (const row of this.newfileListaber) {
      //   switch (row.ext) {
      //     case "pdf":
      //       this.dialogImageUrl2 = require("@/" + "img/pdf.png");
      //       break;
      //     case "txt":
      //       this.dialogImageUrl2 = require("@/" + "img/txt.png");
      //       break;
      //     case "doc" || "docx":
      //       this.dialogImageUrl2 = require("@/" + "img/word.png");
      //       break;
      //     case "MP4" || "MKV" || "RMVB":
      //       this.dialogImageUrl2 = require("@/" + "img/video.png");
      //       break;
      //     case "jpg":
      //       try {
      //         const data = await viewPicture(row.id);
      //         this.dialogImageUrl2 = window.URL.createObjectURL(
      //           new Blob([data], { type: "image/jpeg" })
      //         );
      //       } catch (error) {
      //         console.log(error);
      //       }
      //       break;
      //     case "png" || "JPEG":
      //       try {
      //         const data = await viewPicture(row.id);
      //         this.dialogImageUrl2 = window.URL.createObjectURL(
      //           new Blob([data], { type: "image/jpeg" })
      //         );
      //       } catch (error) {
      //         console.log(error);
      //       }
      //       break;
      //     default:
      //       this.dialogImageUrl2 = require("@/" + "img/1.png");
      //   }
      //   this.fileListabra.push({
      //     fileId: row.id,
      //     urlT: this.dialogImageUrl2,
      //     url: row.fileUrl,
      //     name: row.oldFileName,
      //   });
      // }
      //     })
      //     .finally(() => {});
    },
    handleRrdio() {
      if (this.formData.isProblem == 1) {
        this.gist = true;
      } else if (this.formData.isProblem == null) {
        this.gist = false;
      } else {
        this.gist = false;
      }
    },
    getTitle() {
      const { row, problem } = this.$route.query;
      this.formData = row;
      this.getFile(row.id);
      // let id = row.okPhoto.split(",");
      console.log('rowrowrow',row.okPhoto)
      if(row.okPhoto != null||row.okPhoto != undefined){
        this.getFileChange(row.okPhoto);
      }
      if (problem == 1) {
        this.handleShow = false;
        this.isRequireSituation = true;
        this.isDeptName = true;
        this.isResponsibleName = true;
        this.isokPhoto = true;
        this.isOkTime = true;
        this.isokPhotoRemove = true;
      }
    },
    handleBack() {
      // 传递数据
      this.$router.push({
        path: "/review/localEvaluation/problemRectificationList",
        query: {
          queryParams: this.listQueryParams,
        },
      });
    },
    open() {
      this.peopleOpen = true;
    },
    open2() {
      this.peopleOpen1 = true;
    },
    submitPeople1(peopleList) {
      if (peopleList.length != 1) {
        return this.$message.warning("请选择一个岗位");
      }
      this.formData.deptName = peopleList[0].label;
      this.peopleOpen1 = false;
    },
    submitPeople(peopleList) {
      if (peopleList.length != 1) {
        return this.$message.warning("请选择一位人员");
      }
      this.formData.responsibleName = peopleList[0].userName;
      this.formData.responsibleCode = peopleList[0].userId;
      this.peopleOpen = false;
    },
    //保存
    handleConfirm() {
      console.log(this.formData.okPhoto)
      // return
      this.$refs["vForm"].validate((valid) => {
        if (valid) {
          if (this.formData.isApply[0] == "适用") {
            this.formData.isApply = 0;
          } else if (this.formData.isApply[0] == "不适用") {
            this.formData.isApply = 2;
          } else {
            this.formData.isApply = 1;
          }
          if (this.formData.isGreatProblem[0] == "是") {
            this.formData.isGreatProblem = 1;
          } else {
            this.formData.isGreatProblem = 0;
          }
          if (this.formData.isProblem[0] == "是") {
            this.formData.isProblem = 1;
          } else {
            this.formData.isProblem = 0;
            this.formData.problem = "";
            this.formData.rectifySuggest = "";
            this.formData.deductPursuant = "";
          }

          this.$modal.loading("保存中");
          if (this.formData.id !== undefined) {
            updateGroping(this.formData)
              .then((response) => {
                this.$modal.msgSuccess("修改成功");
              })
              .finally(() => {
                this.$modal.closeLoading();
                // 传递数据
                this.$router.push({
                  path: "/review/localEvaluation/problemRectificationList",
                  query: {
                    queryParams: this.listQueryParams,
                  },
                });
                this.reset();
              });
          } else {
            this.formData.refId = this.$route.query.id;
            this.formData.level = parseInt(this.$route.query.level) + 1;
            addGroping(this.formData)
              .then((response) => {
                this.$modal.msgSuccess("新增成功");
              })
              .finally(() => {
                // this.buttonLoading = false;
                this.$refs.vForm.resetFields(); // 重置表单数据
                this.$router.push(
                  "/review/localEvaluation/projectEvalutionList"
                );
                this.reset();
              });
          }
        }
      });
    },
    reset() {
      this.formData = {
        id: undefined,
        refId: undefined,
        reviewEvents: undefined,
        evaluationElements: undefined,
        examinerCode: undefined,
        examiner: undefined,
        isApply: undefined,
        lookWorkCase: undefined,
        evaluateCase: undefined,
        isInnovate: undefined,
        evaluateObject: undefined,
        backingMaterial: "",
        lookPapersCase: undefined,
        deduct: undefined,
        isProblem: undefined,
        problem: undefined,
        isGreatProblem: undefined,
        rectifySuggest: undefined,
        scenePhoto: undefined,
        reviewStatus: "未评审",
        reviewStandard: undefined,
        scoreStandard: undefined,
        isDelete: undefined,
        evaGroupId: undefined,
        deptCode: undefined,
        deptName: undefined,
        responsibleCode: undefined,
        responsibleName: undefined,
        requireOkTime: undefined,
        okTime: undefined,
        requireSituation: undefined,
        okPhoto: undefined,
      };
    },
    submitForm() {},
    resetForm() {
      this.$refs["vForm"].resetFields();
    },
    handleSuccess(response, file, fileList) {
      // 文件上传成功后，将文件信息添加到表格数据中
      // this.fileList = fileList;
      // this.tableData.push({
      //   name: file.name,
      //   size: (file.size / 1024).toFixed(2) + "KB",
      //   url: URL.createObjectURL(file.raw),
      // });
      uploadFile(file).then((res) => {
        this.$nextTick(() => {});
      });
    },
    handlePreview(file) {
    },
    handleRemove(file, fileList) {
      for (let i = 0; i < this.fileListabra.length; i++) {
        if (this.fileListabra[i].fileId == file.fileId) {
          this.fileListabra.splice(i, 1);
          // let that = _this;
          this.formData.okPhoto = "";
          for (const row of this.fileListabra) {
            this.formData.okPhoto += row.fileId + ",";
          }
        }
        if (this.newfileListaber[i].id == file.fileId) {
          this.newfileListaber.splice(i, 1);
        }
      }
      if (undefined != file.fileId) {
        delFileInfo(file.fileId);
      }
      // 文件删除时，同时从表格数据中删除对应的文件信息
      // this.fileList = fileList;
      // this.tableData = this.tableData.filter((item) => item.name !== file.name);
    },
    beforeRemove(file, fileList) {
      return this.$confirm(`确定移除 ${file.name}？`);
    },
    handleExceed(files, fileList) {
      this.$message.warning("只能上传不超过3个文件");
    },
    beforeRemoves(row) {
      this.$confirm(`确定移除 ${row.name}？`)
        .then(() => {
          const index = this.tableData.indexOf(row);
          if (index !== -1) {
            this.fileList.splice(index, 1);
          }
          this.handleRemove(row, this.fileList);
        })
        .catch(() => {});
    },
    handleSelectionChange(val) {
      this.selectedRows = val;
    },
    deleteSelectedRows(event) {
      event.stopPropagation();
      this.$confirm(`确定移除 ？`)
        .then(() => {
          this.selectedRows.forEach((row) => {
            const index = this.tableData.indexOf(row);
            if (index !== -1) {
              this.tableData.splice(index, 1);
              this.fileList.splice(index, 1);
            }
          });
          this.selectedRows = [];
        })
        .catch(() => {});
    },
    //文件上传
    handleBeforeUpload(file) {
      // 校检文件类型
      // if (this.fileType) {
      //   const fileName = file.name.split(".");
      //   const fileExt = fileName[fileName.length - 1];
      //   const isTypeOk = this.fileType.indexOf(fileExt) >= 0;
      //   if (!isTypeOk) {
      //     this.$modal.msgError(
      //       `文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`
      //     );
      //     return false;
      //   }
      // }
      false;
      if (this.fileSize) {
        const isLt = file.size / 1024 / 1024 < this.fileSize;
        if (!isLt) {
          this.$modal.msgError(`上传文件大小不能超过 ${this.fileSize} MB!`);
          return false;
        }
      }
      this.$modal.loading("正在上传文件，请稍候...");
      this.number++;
      return true;
    },
    // 文件个数超出
    handleExceed() {
      this.$modal.msgError(`上传文件数量不能超过6个!`);
    },
    // 上传失败
    handleUploadError(err) {
      this.$modal.msgError("上传文件失败，请重试");
      this.$modal.closeLoading();
    },
    handlePictureCardPreview(file) {
      preview(file.fileId).then((data) => {
        if (data != "") {
          window.open(
            window.URL.createObjectURL(new Blob([data], { type: "image/jpeg" }))
          );
          return;
        }
      });
      this.dialogVisible = true;
    },
    handleDownload(file) {
      // window.open(file.url)
      let row = {};
      row.id = file.fileId;
      row.oldFileName = file.name;
      this.fileDownload(row);
    },
    /** 文件下载操作 */
    fileDownload(row) {
      this.$modal.loading("下载中");
      preview(row.id).then((data) => {
        if (data != "") {
          // window.open(window.URL.createObjectURL(new Blob([data], {type: 'image/jpeg'})));
          return;
        }
      });
      download(row.id)
        .then((rew) => {
          this.$modal.closeLoading();
          // 创建临时的下载链接
          const url = window.URL.createObjectURL(rew);
          if (typeof window.chrome !== "undefined") {
            // chrome
            const link = document.createElement("a");
            link.href = url;
            //  row.oldFileName  文件名字
            link.download = row.oldFileName;
            link.click();
            // window.open(rew)
            window.URL.revokeObjectURL(link.href); // 释放资源
          } else if (typeof window.navigator.msSaveBlob !== "undefined") {
            // IE
            window.navigator.msSaveBlob(rew, row.oldFileName);
          } else {
            // Firefox
            const file = new File([rew], row.oldFileName, {
              type: "application/octet-stream",
            });
            window.open(URL.createObjectURL(file));
          }
        })
        .finally(() => {});
    },
    test(res) {
      this.uploadList.push({
        name: res.data.oldFileName,
        url: res.data.fileUrl,
        fileId: res.data.id,
        urlT: this.dialogImageUrl,
      });
      this.uploadedSuccessfully();
    },
    // 上传成功回调
    handleUploadSuccess(res, file) {
      let suffix = res.data.fileName.split(".").pop();
      // debugger
      switch (suffix) {
        case "pdf":
          this.dialogImageUrl = require("@/" + "img/pdf.png");
          this.test(res);
          break;
        case "txt":
          this.dialogImageUrl = require("@/" + "img/txt.png");
          this.test(res);
          break;
        case "doc" || "docx":
          this.dialogImageUrl = require("@/" + "img/word.png");
          this.test(res);
          break;
        case "xlsx" || "xls":
          this.dialogImageUrl = require("@/" + "img/excel.png");
          this.test(res);
          break;
        case "MP4" || "MKV" || "RMVB":
          this.dialogImageUrl = require("@/" + "img/video.png");
          this.test(res);
          break;
        case "jpg":
          viewPicture(res.data.id).then((data) => {
            this.dialogImageUrl = window.URL.createObjectURL(
              new Blob([data], { type: "image/jpeg" })
            );
            this.test(res);
          });
          break;
        case "JPEG":
          viewPicture(res.data.id).then((data) => {
            this.dialogImageUrl = window.URL.createObjectURL(
              new Blob([data], { type: "image/jpeg" })
            );
            this.test(res);
          });
          break;
        case "png":
          viewPicture(res.data.id).then((data) => {
            this.dialogImageUrl = window.URL.createObjectURL(
              new Blob([data], { type: "image/jpeg" })
            );

            this.test(res);
          });
          break;
        default:
          this.dialogImageUrl = require("@/" + "img/1.png");
          this.test(res);
      }
      console.log(
        this.dialogImageUrl + "          图片回显路径               "
      );
      if (res.code === 200) {
        // this.uploadList.push({
        //   name: res.data.oldFileName,
        //   url: res.data.fileUrl,
        //   fileId: res.data.id,
        // });
        this.newfileList.push({
          oldFileName: res.data.oldFileName,
          url: res.data.fileUrl,
          id: res.data.id,
          urlT: this.dialogImageUrl,
        });
        this.formData.backingMaterial += res.data.id + ",";
        // this.uploadedSuccessfully();
      } else {
        this.number--;
        this.$modal.closeLoading();
        this.$modal.msgError(res.msg);
        this.$refs.fileUpload.handleRemove(file);
        this.uploadedSuccessfully();
      }
    },
    // 删除文件
    handleDelete(index) {
      let ossId = this.fileList[index].ossId;
      delOss(ossId);
      this.fileList.splice(index, 1);
      this.$emit("input", this.listToString(this.fileList));
    },
    // 上传结束处理
    uploadedSuccessfully() {
      if (this.number > 0 && this.uploadList.length === this.number) {
        this.fileList = this.fileList.concat(this.uploadList);
        this.uploadList = [];
        this.number = 0;
        this.$emit("input", this.listToString(this.fileList));
        this.$modal.closeLoading();
      }
    },
    // 获取文件名称
    getFileName(name) {
      // 如果是url那么取最后的名字 如果不是直接返回
      if (name.lastIndexOf("/") > -1) {
        return name.slice(name.lastIndexOf("/") + 1);
      } else {
        return name;
      }
    },
    // 对象转成指定字符串分隔
    listToString(list, separator) {
      let strs = "";
      separator = separator || ",";
      for (let i in list) {
        strs += list[i].ossId + separator;
      }
      return strs != "" ? strs.substr(0, strs.length - 1) : "";
    },
    // 移除文件
    removeFile(index, file) {
      // 从 fileList 数组中移除文件
      for (let i = 0; i < this.fileList.length; i++) {
        if (this.fileList[i].fileId == file.fileId) {
          this.fileList.splice(i, 1);
        }
        if (this.newfileList[i].id == file.fileId) {
          this.newfileList.splice(i, 1);
        }
      }
      if (undefined != file.fileId) {
        delFileInfo(file.fileId);
      }
      // 从 fileList 数组中移除文件
      // this.fileList.splice(index, 1);
      // if (undefined != file.fileId) {
      //   delFileInfo(file.fileId);
      // }
      // 还可以在这里进行删除服务器上对应文件的操作，具体操作取决于您的后端实现
    },
    // 是否适用
    setMealSelect(val) {
      // 截取数组的最后一位,并从新赋值
      this.formData.isApply = this.formData.isApply.slice(-1);

      if (this.formData.isApply[0] === "不参与") {
        this.flagNew = false;
        this.gist = false;
      } else if (this.formData.isApply[0] === "不适用") {
        this.flagNew = false;
        this.gist = false;
      } else {
        this.flagNew = true;
        this.gist = true;
      }
    },
    isProblemChange(value) {
      this.formData.isProblem = this.formData.isProblem.slice(-1);
      this.formData.isGreatProblem[0] = "否";

      // 在这里执行与显示和隐藏相关的操作
      if (this.formData.isProblem[0] == "是") {
        // this.formData.rectifySuggestHidden = false;
        this.gist = true;
      } else {
        // this.formData.rectifySuggestHidden = true;
        this.gist = false;
        this.formData.problem = "";
        this.formData.rectifySuggest = "";
        this.formData.deductPursuant = "";
      }
    },
    isProblemBigChange() {
      this.formData.isGreatProblem = this.formData.isGreatProblem.slice(-1);
    },
    cliekDen(row) {
      this.formData.standardScore = Number(formData.standardScore);

      this.actualScore = Number(this.formData.standardScore) - row;
    },
  },
};
</script>

<style lang="scss" scoped>
.el_col {
  display: flex;
  justify-content: space-evenly;
  align-content: center;
}
.card-container {
  height: 80%; /* 设置容器的高度为 100% */
  display: flex;
  flex-direction: column;
}
.card-item {
  flex: 1; /* 平分容器的宽度 */
}
#FormDialog {
  height: 100%;
  display: flex;
  flex-wrap: nowrap;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.dialog-footer1 {
  width: 100%;
  height: 6vh;
  background: #ffffff;
  text-align: center;
  line-height: 6vh;
}
.el-card {
  margin-top: 10px;
}
.el-select {
  width: 100%;
}
.el-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.el-form-item {
  width: 30%;
}
.el-date-editor.el-input,
.el-date-editor.el-input__inner {
  width: 100%;
}
.el-form-item {
  margin-bottom: 11px;
}
.el-table {
  min-height: 50% !important;
}
.always_handerOne {
  height: 80px;
  background-color: #ffffff;
  // border-radius: 14px;
}
.always_handerOne1 {
  height: auto;
  background-color: #ffffff;
  // border-radius: 14px;
  padding: 20px;
}
.always_title {
  font-size: 20px;
  font-weight: bold;
  line-height: 53px;
  margin-left: 30px;
}
.always_title1 {
  font-size: 18px;
  font-weight: bold;
  // line-height: 53px;
  margin-left: 15px;
  position: relative;
}
.always_title1 ::before {
  content: "|";
  flex-shrink: 0;
  width: 4px;
  height: 6%;
  margin-left: 12px;
  // background: #f90;
  color: #f90;
  position: absolute;
  left: -22px;
  margin-bottom: 12px;
}
.always_hander {
  background: url(../../../assets/images/header0.png);
  height: 20px;
  width: 100%;
}
.margin_col {
  margin-bottom: 20px;
}
.el_formContent .el-form-item {
  width: 50%;
}
::v-deep .el-checkbox-button.is-checked .el-checkbox-button__inner {
  background-color: #e8f4ff !important;
  border: 1px solid #409eff !important;
  color: #409eff !important;
  /* background-color: var(--fill-color) !important;
  border: 1px solid var(--fill-border) !important;
  color: #000 !important;   */
}
.ces {
  width: 33.2%;
}
.el-header {
  padding: 0px 0px;
}
.style-Change {
  padding: 0px 0px;
  background: #ffffff;
}
.el-slider__bar {
  height: 6px;
  background-color: red !important;
  border-top-left-radius: 3px;
  border-bottom-left-radius: 3px;
  position: absolute;
}
.el_col {
  display: flex;
  justify-content: space-evenly;
  align-content: center;
}
.card-container {
  height: 80%; /* 设置容器的高度为 100% */
  display: flex;
  flex-direction: column;
}
.card-item {
  flex: 1; /* 平分容器的宽度 */
}
#FormDialog {
  height: 100%;
  display: flex;
  flex-wrap: nowrap;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.dialog-footer1 {
  width: 100%;
  height: 6vh;
  background: #ffffff;
  text-align: center;
  line-height: 6vh;
}
.el-card {
  margin-top: 10px;
  width: 504px;
  height: 200px;
  background-color: #f8faff;
}
.el-select {
  width: 100%;
}
.el-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.el-form-item {
  width: 30%;
}
.el-date-editor.el-input,
.el-date-editor.el-input__inner {
  width: 100%;
}
.el-form-item {
  margin-bottom: 22px;
}
.el-table {
  min-height: 50% !important;
}
.always_handerOne {
  height: 80px;
  background-color: #ffffff;
  //border-radius: 14px;
}
.always_handerOne1 {
  height: auto;
  background-color: #ffffff;
  //border-radius: 14px;
  padding: 20px;
}
.always_title {
  font-size: 20px;
  font-weight: bold;
  line-height: 53px;
  margin-left: 30px;
}
.always_title1 {
  font-size: 18px;
  font-weight: bold;
  // line-height: 53px;
  margin-left: 15px;
  position: relative;
}
.always_title1 ::before {
  content: "|";
  flex-shrink: 0;
  width: 4px;
  height: 6%;
  margin-left: 12px;
  // background: #f90;
  color: #f90;
  position: absolute;
  left: -22px;
  margin-bottom: 12px;
}
.always_hander {
  background: url(../../../assets/images/header0.png);
  height: 20px;
  width: 100%;
}
.margin_col {
  margin-bottom: 20px;
}
.el_formContent .el-form-item {
  width: 50%;
}
.imageList {
  display: flex;
}
.demonstration {
  text-align: center;
}
.sel-width {
  width: 90%;
}
.el-header {
  padding: 0px 0px;
}
.el-radio-group {
  display: flex;
  line-height: 1;
  vertical-align: middle;
  font-size: 0;
}
.styleCentre {
  line-height: 2.5;
}
.style-Change {
  padding: 0px 0px;
  background: #ffffff;
}
.el-slider__bar {
  height: 6px;
  background-color: red !important;
  border-top-left-radius: 3px;
  border-bottom-left-radius: 3px;
  position: absolute;
}
.el-tooltip el-slider__button {
  border: solid 2px #49ff7d;
}
</style>
<style scoped>
/deep/ .el-upload {
  width: 100px;
  height: 100px;
  line-height: 100px;
}
/deep/ .el-upload .el-upload-dragger {
  width: 100px;
  height: 100px;
  line-height: 100px;
}
/deep/ .el-upload-list--picture-card .el-upload-list__item {
  width: 100px;
  height: 100px;
  line-height: 100px;
}
/deep/ .upload-file-uploader {
  width: 400%;
  line-height: 0.2;
  height: 100%;
}
/deep/ .el-upload-list__item-thumbnail {
  max-width: 140px; /* 设置图片最大宽度*/
  max-height: 100px; /* 设置图片最大高度 */
  width: auto; /* 宽度自适应*/
  height: auto; /* 高度自适应*/
}
/deep/ .el-radio {
  color: #606266;
  font-weight: 500;
  line-height: 3;
  position: relative;
  cursor: pointer;
  display: inline-block;
  white-space: nowrap;
  outline: none;
  font-size: 14px;
  margin-right: 30px;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

/deep/ .el-slider__runway.show-input {
  margin-right: 330px;
  width: auto;
}
/deep/ .el-slider__input {
  float: right;
  margin-top: 3px;
  width: 130px;
  margin-right: 167px;
}
/deep/ .el-form-item__error {
  color: #ff4949;
  font-size: 12px;
  line-height: 1;
  padding-top: 4px;
  position: absolute;
  top: 100%;
  width: 120px;
  left: 0;
}
/deep/ .el-form-item[data-v-2b0fc66d] {
  margin-bottom: 19px;
}
.form-item {
  width: 100%;
  height: 20vh;
}
.copy-text-box {
  background: #f5f5f5;
  padding: 6px 10px;
  border-radius: 5px;
  height: 15vh;
  font-size: 13px;
  overflow-y: scroll;
  cursor: pointer;
}
.block_file_name {
  line-height: 1.2;
  width: 400%;
}
::v-deep .el-upload-list__item.is-ready,
.el-upload-list__item.is-uploading {
  display: none !important;
}
::v-deep .el-upload-list__item {
  transition: none !important;
}

::v-deep .el-checkbox-button.is-checked .el-checkbox-button__inner {
  background-color: #e8f4ff !important;
  border: 1px solid #409eff !important;
  color: #409eff !important;
  /* background-color: var(--fill-color) !important;
  border: 1px solid var(--fill-border) !important;
  color: #000 !important;   */
}
.ces {
  width: 33.2%;
}

::v-deep .el-checkbox-button__inner {
  width: 100%;
}
::deep .el-form-item--medium {
  width: 30%;
}
::v-deep .el-input-number--medium {
  width: 100%;
}
::v-deep .el-input-number__decrease {
  width: 33.2%;
}
::v-deep .el-input-number__increase {
  width: 33.2%;
}
::v-deep .el-drawer__header {
  height: 35px;
  margin: 20px 30px;
  border-radius: 4px;
  border-left: 5px solid #0169ff;
  background-color: white;
  line-height: 34px;
  padding-left: 18px;
  color: #0169ff;
  background-image: linear-gradient(90deg, #f2f7ff 0%, #ffffff 95%);
  border-radius: 4px;
  font-size: 18px;
  font-weight: 500;
  padding-top: 0px;
}
.text {
  font-size: 14px;
}

.item {
  margin-bottom: 18px;
}

.clearfix:before,
.clearfix:after {
  display: table;
  content: "";
}
.clearfix:after {
  clear: both;
}

.box-card {
  width: 100%;
  height: 20%;
  background-color: #f8faff;
  margin-top: 20px;
}
.cardImg {
  width: 24px;
  height: 24px;
  display: inline-block;
  vertical-align: middle;
}
.titleStyle {
  font-family: PingFangSC-Medium;
  font-size: 16px;
  color: #000000;
  letter-spacing: 0.8px;
  line-height: 20px;
  font-weight: 500;
  margin-left: 8px;
}
::v-deep .el-card__body {
  overflow-y: scroll;
  cursor: pointer;
  padding: 6px 10px;
  height: 70%;
  font-size: 13px;
}
::v-deep .el-button--mini {
  padding: 10px 20px;
}
::v-deep .el-drawer__header {
  min-height: 7% !important;
  height: auto;
}
::v-deep .el-card__header {
  height: 30%;
}
::v-deep .el-upload {
  border: 1px dashed #c0ccda;
  border-radius: 6px;
}


</style>
